package cn.com.dcsgo.api.client;

import cn.com.dcsgo.api.dto.CartVO;
import cn.com.dcsgo.api.dto.ItemDTO;
import cn.com.dcsgo.api.dto.OrderDetailDTO;
import cn.com.dcsgo.api.fallback.CartClientFallbackFactory;
import cn.com.dcsgo.aspect.ApiOperationLog;
import cn.com.dcsgo.config.DefaultFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Collection;
import java.util.List;

@FeignClient(value = "cart-service",configuration = DefaultFeignConfig.class,path = "/carts",fallbackFactory = CartClientFallbackFactory.class)
public interface CartClient {
    /**
     * 查询购物车列表
     * @param userId
     * @return
     */
    @GetMapping("/{userId}")
    public List<CartVO> queryMyCarts(@PathVariable("userId") Long userId);
}